﻿using handyTest.ViewModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace handyTest
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window ,INotifyPropertyChanged
    {
        public MainWindow()
        {
            InitializeComponent();

            // this.DataContext = new MainViewModel();
        }

       

        public event PropertyChangedEventHandler PropertyChanged;


        private double _tValue;
        public double TValue
        {
            get { return _tValue; }
            set
            {

                while (true)
                {
                    Random random = new();
                    random.Next(50, 100);
                    this._tValue = value;
                    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("TValue"));
                }
            }
        }

        private void Test_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (e.LeftButton ==MouseButtonState.Pressed)
            {
                this.DragMove();
            }
        }
    }
}
